import logging
import yagmail
def log_set():
    logging.basicConfig(level=logging.DEBUG,format="%(levelname)s-%(asctime)s-%(message)s",filename="log.txt")
def send_email(a):
    mail = yagmail.SMTP(user='2291385879@qq.com', password='vdsuyyqeqkbtdjhf', host='smtp.qq.com')
    mail.send(to='2291385879@qq.com', subject='测试报告', contents='彭于晏你好', attachments=a)